# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import CSVOperationConstants

class CSVOperationSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(CSVOperationSubDirectiveTree, self).__init__(parent)
        self.createCSVOperationTreeNode()

    def createCSVOperationTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "CSVOperation"
        self.setText(0,"CSV文件操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, CSVOperationConstants.CSVOperationConstants.readingCSVDataDirective, "读取CSV数据")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, CSVOperationConstants.CSVOperationConstants.writingToCSVFileDirective, "写入CSV文件")